<?php
/**
 * Flea Site
 *
 * @copyright  Copyright (c) 2008 Movoin Studio (http://movoin.com)
 * @license    Apache License 2.0
 * @version    $Id: Feedback.php 138 2009-05-25 06:42:38Z movoin $
 */

function _ctlFeedback($name, $args=null)
{
    $opts = array('url');
    $data = FLEA_WebControls::extractAttribs($args, $opts);
    FLEA_WebControls::mergeAttribs($args);

    if(!$data['url'])
        $data['url'] = url($name, 'save');

    $output .= "<style type=\"text/css\">\n";
    $output .= ".gb-write {}\n";
    $output .= ".gb-write label { color:#333; padding-top:10px; display:block; }\n";
    $output .= ".gb-write textarea { width:100%; border:1px #ccc solid; height:140px; }\n";
    $output .= ".gb-write table { width:100%; margin-top:8px; }\n";
    $output .= ".gb-write input[type=\"text\"] { width:98%; border:1px #ccc solid; height:20px; line-height:20px; }\n";
    $output .= ".gb-write input[type=\"submit\"] { width:120px; border:1px #ccc solid; height:30px; line-height:30px; margin-top:12px; }\n";
    $output .= ".gb-write .tips {}\n";
    $output .= ".gb-write .tips p { line-height:1.6; font-size:13px;}\n";
    $output .= ".gb-write .tips ol { background:#fbfbfb; padding-top:12px; padding-bottom:12px; }\n";
    $output .= ".gb-write .hr { display:block; height:1px; background:#ccc; margin:15px 0; }\n";
    $output .= "</style>\n";
    $output .= "<div class=\"gb-write\">\n";
    $output .= "<div class=\"tips\">\n";
    $output .= "<p class=\"b\">尊贵的朋友，您好！</p>\n";
    $output .= "<p>为了保证您得到更好的服务，需要您提供详细的订购信息(包括：姓名、电话、收货地址、产品名称型号等)，我公司核对准确后及时给您提供最优质的服务。 </p>\n";
    $output .= "</div>\n";
    $output .= "<span class=\"hr\"></span>\n";
    $output .= "<form action=\"" . $data['url'] . "\" method=\"post\">\n";
    $output .= "<table>\n";
    $output .= "<tr>\n";
    $output .= "<td><label for=\"company\">(*)公司名称：</label></td>\n";
    $output .= "<td><label for=\"contact\">(*)联系人：</label></td>\n";
    $output .= "<td><label for=\"email\">(*)联系邮箱：</label></td>\n";
    $output .= "</tr>\n";
    $output .= "<tr>\n";
    $output .= "<td><input type=\"text\" id=\"company\" name=\"company\" value=\"\" /></td>\n";
    $output .= "<td><input type=\"text\" id=\"contact\" name=\"contact\" value=\"\" /></td>\n";
    $output .= "<td><input type=\"text\" id=\"email\" name=\"email\" value=\"\" /></td>\n";
    $output .= "</tr>\n";
    $output .= "<tr>\n";
    $output .= "<td><label for=\"tel\">(*)公司电话：</label></td>\n";
    $output .= "<td><label for=\"fax\">(*)传真号码：</label></td>\n";
    $output .= "<td><label for=\"address\">(*)公司地址：</label></td>\n";
    $output .= "</tr>\n";
    $output .= "<tr>\n";
    $output .= "<td><input type=\"text\" id=\"tel\" name=\"tel\" value=\"\" /></td>\n";
    $output .= "<td><input type=\"text\" id=\"fax\" name=\"fax\" value=\"\" /></td>\n";
    $output .= "<td><input type=\"text\" id=\"address\" name=\"address\" value=\"\" /></td>\n";
    $output .= "</tr>\n";
    $output .= "<tr>\n";
    $output .= "<td><label for=\"product\">(*)产品型号：</label></td>\n";
    $output .= "<td><label for=\"sum\">(*)订购数量：</label></td>\n";
    $output .= "<td></td>\n";
    $output .= "</tr>\n";
    $output .= "<tr>\n";
    $output .= "<td><input type=\"text\" id=\"product\" name=\"product\" value=\"\" /></td>\n";
    $output .= "<td><input type=\"text\" id=\"sum\" name=\"sum\" value=\"\" /></td>\n";
    $output .= "<td></td>\n";
    $output .= "</tr>\n";
    $output .= "</table>\n";
    $output .= "<p><input type=\"submit\" value=\"提交订单\" /></p>\n";
    $output .= "</form>\n";
    $output .= "</div>\n";

    return $output;
}
